
for i in range(3):
    num = input()
    if "zero" in num:
        print(0)
    if "one" in num:
        print(1)
    if "two" in num:
        print(2)
    if "three" in num:
        print(3)
    if "four" in num:
        print(4)
    if "five" in num:
        print(5)
    if "six" in num:
        print(6)
    if "seven" in num:
        print(7)
    if "eight" in num:
        print(8)
    if "nine" in num:
        print(9)
    if "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" in num:
        print("Wrong input")
    
